﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
         CodeBehind="SessionList.aspx.cs" Inherits="SARS.Tutor.SessionList" %>

<%@ Register Src="../UserControl/UcProgramCourse.ascx" TagName="UcProgramCourse"
             TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2 { width: 201px; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        List of Session</h1>
    <uc1:UcProgramCourse ID="UcProgramCourse1" runat="server" OnSelectedCourseChanged="ucProgramCourse_OnSelectedCourseChanged" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" Direction="LeftToRight">
                <table>
                    <tr>
                        <td class="leftLabel">
                            &nbsp;</td>
                        <td>
                            <asp:Button ID="btnBack" runat="server" CausesValidation="False" 
                                        onclick="btnBack_Click" Text="   Back   " />
                        </td>
                    </tr>
                    <tr>
                        <td class="leftLabel">
                        </td>
                        <td>
                            <asp:GridView ID="grvSession" runat="server" AutoGenerateColumns="False" 
                                          CellPadding="4" ForeColor="#333333" GridLines="None" 
                                          OnRowCommand="grvSession_RowCommand" style="margin-left: 0px"
                                          EmptyDataText="There is no session in selected course.">
                                <Columns>
                                    <asp:BoundField DataField="SessionTopic" HeaderText="Session Topic" 
                                                    ReadOnly="True" />
                                    <asp:BoundField DataField="SessionType" HeaderText="Session Type" 
                                                    ReadOnly="True" />
                                    <asp:BoundField DataField="StartDate" DataFormatString="{0:dd-MMM-yyyy hh:mm}" 
                                                    HeaderText="Start Date" ReadOnly="True" />
                                    <asp:BoundField DataField="EndDate" DataFormatString="{0:dd-MMM-yyyy hh:mm}" 
                                                    HeaderText="End Date" ReadOnly="True" />
                                    <asp:BoundField DataField="Status" HeaderText="Status" ReadOnly="True" />
                                    <asp:BoundField DataField="Manager.FullName" HeaderText="Tutor/Lecture" 
                                                    ReadOnly="True" />
                                    <asp:BoundField DataField="Room.RoomName" HeaderText="Room" ReadOnly="True" />
                                    <asp:BoundField DataField="Course.CourseName" HeaderText="Course" 
                                                    ReadOnly="True" />
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkEdit" runat="server" 
                                                            CommandArgument="<% #Bind('SessionID') %>" CommandName="Edit" Text="Edit"></asp:LinkButton>
                                            <asp:LinkButton ID="lnkDelete" runat="server" 
                                                            CommandArgument="<% #Bind('SessionID') %>" CommandName="Delete" Text="Delete"></asp:LinkButton>
                                            <asp:HiddenField ID="hdnStudentID" runat="server" 
                                                             Value="<% #Bind('SessionID') %>" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>